//
//  CDepartmentMgr.h
//  wanzhaoIM
//
//  Created by liuyuantao on 15/5/22.
//  Copyright (c) 2015年 liuyuantao. All rights reserved.
//

#import <Foundation/Foundation.h>
@class CDepartmentModel;
@interface CDepartmentMgr : NSObject
//插入部门信息
-(BOOL)insertDepartment:(CDepartmentModel *)department;
//批量插入部门信息
-(BOOL)batchInsertDepartment:(NSArray *)departmentList;

//删除部门信息
-(BOOL)delDepartment:(CDepartmentModel *)department;

-(BOOL)delDepartmentWithDeptId:(NSString *)deptId;

//获取部门信息
-(CDepartmentModel *)loadDepartment:(NSString *)departmentID;

//根据父id获取部门信息
-(NSArray *)loadDepartments:(NSString *)fatherDepartmentID;

//删除所有部门信息
-(BOOL)delAllDepartment;

- (BOOL)updateDepartmentIsdelWithDeptId:(NSString *)deptId IsDel:(BOOL)IsDel;
//更新部门信息
- (BOOL)updateDepartment:(CDepartmentModel *)department;



- (BOOL)updateAllDeptNotSelected:(NSArray *)deptList;
- (BOOL)updateSelectWithDeptList:(NSArray *)deptList isSelected:(BOOL)isSelected;
- (BOOL)updateDeptSelectedWithDept:(CDepartmentModel *)dept seleceted:(BOOL)isSelected;
@end
